Skip to content

fix: set default cell value using column's parseValue function - #2914

Merged
blizzz merged 1 commit into
mainfrom
fix/view-fe-filter
Aug 28, 2026
Merged

fix: set default cell value using column's parseValue function#2914
blizzz merged 1 commit into
mainfrom
fix/view-fe-filter

Conversation

@enjeck

@enjeck enjeck commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

A cell that has never been given a value has no stored entry and inherits the column default when read. The display (TableRow.vue getCellValue) and the server-side View filter (Row2Mapper.php includeDefault) both honor that default, but the quick filter and search in the default table view (NcTable.vue getSearchedAndFilteredRows) did not. They read an unset cell as null, so rows that visibly show their default value were dropped, and the same filter returned fewer rows in the table than in an equivalent View. The fix falls back to the column default for an unset cell, the same way the display does. parseValue converts the stored default form (e.g. "0") into the cell form (0) so lookups and comparisons match. Client-side only, no backend or migration change.

to reproduce:
  1. Create a table and add several rows.
  2. Add a selection column "Status" with options "Active" and "Inactive" and a default of "Active". Add it after the rows already exist, so those rows have no stored value for it and all display "Active".
  3. Set two rows explicitly to "Active" and one to "Inactive". Leave the rest untouched.
  4. In the default table view, filter Status "is equal" to "Active". Only the two explicit rows appear.
  5. Apply the same filter in a View. Every row showing "Active" appears, including the untouched ones.

With 10 untouched rows, 2 explicit "Active", and 1 explicit "Inactive", the table filter returns 2 while the View returns 12. After the fix both return 12.

🖼️ Screenshots

🏚️ Before 🏡 After
Capture d’écran 2026-08-24 à 20 37 22 Capture d’écran 2026-08-24 à 20 33 25

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@enjeck enjeck self-assigned this Aug 24, 2026
@enjeck
enjeck requested a review from blizzz as a code owner August 24, 2026 19:39
@enjeck enjeck added bug Something isn't working 3. to review Waiting for reviews labels Aug 24, 2026
@enjeck
enjeck force-pushed the fix/view-fe-filter branch 2 times, most recently from 47ae622 to fc4294e Compare August 25, 2026 02:11
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
@enjeck
enjeck force-pushed the fix/view-fe-filter branch from fc4294e to afc059a Compare August 25, 2026 02:12
@samin-z
samin-z self-requested a review August 28, 2026 09:22
@blizzz
blizzz merged commit 1d45bc5 into main Aug 28, 2026
60 checks passed
@blizzz
blizzz deleted the fix/view-fe-filter branch August 28, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants